package com.example.demo.NiuKe.v12;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;


public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s=br.readLine();
        Integer i = Integer.valueOf(s);
        String str;
        String []strings = new String[i];
        int count =0;
        while ((str = br.readLine())!= null){
          strings[count] = str;
          count++;
          if(count == i){
              Arrays.sort(strings);
              for (int j =0;j<i;j++){
                  System.out.println(strings[j]);
              }
          }
        }

    }
}
